import instance from './http'

const api = {
    // get方法
    get(url, params) {
        return instance({
            url: url,
            method: "get",
            params: params
        })
    },
    // post方法
    post(url, data) {
        return instance({
            url: url,
            method: "post",
            data: data
        })
    },
    // put方法
    put(url, data) {
        return instance({
            url: url,
            method: "put",
            data: data
        })
    },
    // delete方法
    delete(url, data) {
        return instance({
            url: url,
            method: "delete",
            data: data
        })
    },
}
export default api